Skip to content

Conversation

finestructure
Copy link
Member

@finestructure finestructure commented Oct 13, 2024

This adds scheme and reconciliation support for custom package collections (#2957) and reads the SSWG package's sandbox, incubating, and graduated package lists (from a temporary location).

Does not include any visual representation or use of the data in search yet.

@cla-bot cla-bot bot added the cla-signed label Oct 13, 2024
struct PackageListRepositoryClient {
var fetchCustomCollection: @Sendable (_ client: Client, _ url: URL) async throws -> [URL]
var fetchCustomCollections: @Sendable (_ client: Client) async throws -> [CustomCollection.DTO]
// TODO: move other package list dependencies here
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will do this in a follow-up PR right after this one but I wanted to keep the change set focused.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, this illustrates how we would set up grouped dependencies (like Github, for instance) with the new Dependencies mechanism.

}

func filter(by urls: some Collection<URL>) -> Self {
filter(\.$url ~~ urls.map(\.absoluteString))
Copy link
Member Author

@finestructure finestructure Oct 13, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is an SQLKit based way to make this a case-insensitive filter but it's a bit more complicated. I'll leave that to a follow-up.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When doing that, we should also canonicalise the urls from the custom collection. Since they are not added via our normal package list mechanism and validated (canonicalised) in the process, we can't assume they're all as well-formed as they are in the main package list.

@finestructure
Copy link
Member Author

Ad hoc deploying the branch for testing.

@finestructure finestructure marked this pull request as ready for review October 13, 2024 13:39
@finestructure finestructure force-pushed the custom-package-collections branch from 1f16519 to ee683dc Compare October 14, 2024 08:38
@finestructure finestructure force-pushed the custom-package-collections branch from ee683dc to 5efe3f3 Compare October 14, 2024 10:02
@finestructure finestructure merged commit fb329e2 into main Oct 14, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants